home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 1
/
Gekikoh Dennoh Club Vol. 1 (Japan).7z
/
Gekikoh Dennoh Club Vol. 1 (Japan) (Track 1).bin
/
kowin
/
archive
/
apl
/
gview120.lzh
/
gviewsrc.lzh
/
ugopen.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-27
|
683b
|
31 lines
/* Copyright 1992 H.Ogasawara (COR.) */
#include <corlib.h>
#include <sys_doslib.h>
#include "gview.h"
GVIEW *
GV_UG_Open( ug )
UGraphic *ug;
{
GVIEW *gp;
int x, y;
WindowGetGraphicOffset( &x, &y );
if( !(gp= GV_Alloc( ug->h, ug->v, ug->color, "", NULL, 0 )) ){
GV_Err( "メモリが足りません" );
return NULL;
}
if( ug->color != WindowAttrGraphic65536 ){
int size= GV_PaletSize( ug->color );
if( ug->palet ){
memcpy( gp->palet, ug->palet, size*2 );
}else
GV_GetSysPalet( gp );
GV_PaletToBase( gp );
memcpy( gp->buf, ug->buf, ug->h*ug->v );
}else
memcpy( gp->buf, ug->buf, ug->h*ug->v*2 );
GV_Open( x, y, gp );
return gp;
}